<%@ page language="java" import="com.alibaba.fastjson.JSONObject" pageEncoding="UTF-8" %>
<%@ page import="weaver.conn.RecordSet" %>
<%@ page import="weaver.general.Util" %>
<%@ page import="java.util.HashMap" %>
<%@ page import="java.util.Map" %>
<%--用款流程关联合同流程清单--%>
<%
    String formids = Util.null2String(request.getParameter("formids"));
    Map<String, Object> apidatas = new HashMap<String, Object>();
    String workflowids = "";
    try {
        RecordSet rs = new RecordSet();
        rs.executeQuery("select (case when activeversionid is null then id else activeversionid end) from " +
                "workflow_base where abs(formid) in (" + formids + ")");
        while (rs.next()) {
            String workflowid = Util.null2String(rs.getString(1));
            workflowids += "".equals(workflowids) ? workflowid : "," + workflowid;
        }
    } catch (Exception e) {
        e.printStackTrace();
    }
    apidatas.put("workflowids", workflowids);
    out.print(JSONObject.toJSONString(apidatas));
%>



